import api from '../index'
import type { ResponseData,PagingData,pageParam} from '../type'
import type {OrderItem} from '.'

export interface TeamOrderItem {
	id:number
	state:number
	orderMoney:number
	total:number
	userNickName:string
	userPhoto:string
	money:number
	receivingStatus:number
	orderMoneyPay:string
	params:{
		order:OrderItem&{
			orderRemarks:string
			orderGroupNowNum:number
			orderGroupNum:number
			orderGroupUserPhotos:string[]
		}
	}
}
// 团队订单
export const getTeamRewardLog = (data : pageParam) =>
	api.get<ResponseData<PagingData<TeamOrderItem>>&{orderMoney:number}>('customer/api/team/reward/log', {
		data
	})
export interface TeamOrderInfo extends TeamOrderItem {
	
	userName:string
	userLevelName:string
	targetNickName?:string
	targetUserName?:string
	targetLevelName?:string
}
// 团队订单-详情
export const getTeamRewardDetail = (id : string | number) =>
	api.get<ResponseData<TeamOrderInfo>>(`customer/api/team/reward/log/${id}`)